@extends('default.layouts.companyPublic')
@section('title', '部门管理')
@section('headcss')
    @parent
    <link rel="stylesheet" href="{{asset('/default/css/company/list.css')}}">
@endsection
@section('rightcon')
    <div class="right">
        <div class="jright">
            <div class="content">
                <div class="jobtitle">
                    <div class="tithead">
                        <ul>
                            <li><a href="{{url('company/basic_info')}}">基本资料</a></li>
                            <li><a href="{{url('company/license_sub')}}">企业认证</a></li>
                            <li class="active"><a href="{{url('company/department')}}">部门管理</a></li>
                            <li><a href="{{url('company/map')}}">地图坐标</a></li>
                            <li><a href="{{url('company/photo')}}">企业相册</a></li>
                        </ul>
                    </div>
                </div>
                {{--\搜索内容--}}
                <div class="jobsearch">
                    <form name="Formso" action="{{url('company/department')}}" method="post">
                        {!! csrf_field() !!}
                        <span><input name="keyword" class="keyWord" value="" id="keyword" placeholder="请输入部门名称或联系人" type="text"/></span>
                         <span><input name="submit" class="searpos" value="" id="" type="submit"/></span>
                    </form>
                </div>
				<div class="addpos"><a href="{{url('company/department/create')}}"><i></i>新增部门</a></div>
                {{--显示列表--}}
                <div class="pinfo">
                    <form name="thisForm" action="{{url('personal/resume_send')}}" method="post">
                        {{ method_field('DELETE') }}
                        <div class="listmenu">
                                <ul class="one">
                                    <li class="p1"></li>
                                    <li class="p2">部门名称</li>
                                    <li class="p4">联系人</li>
                                    <li class="p2">联系方式</li>
                                    <li class="p5">操作</li>
                                </ul>
                            <div class="information"><span>总共<em>{{$list->total()}}</em>个部门！</span></div>
                            {{--循环--}}
                            @if($list->count() > 0 )
                                @foreach($list as $v)
                                    <ul id="list{{$v->id}}">
                                        <li class="p1">
                                            <input name="selected_id[]" class="checkboxs" value="{{$v->id}}" type="checkbox"/>
                                        </li>
                                        <li class="p2">{{$v->name}}</li>
                                        <li class="p4">{{$v->contacts}}</li>
                                        <li class="p2">{{$v->phone}}</li>
                                        <li class="p5" id="operate"><a href="{{url('company/department/'.$v->id.'/edit')}}"><i class="p edit"></i></a> <a onclick="destroy('{{url('company/department/'.$v->id.'/destroy')}}')"><i class="p del"></i></a></li>
                                    </ul>
                                @endforeach
                            @else
                                <div class="nullcon">对不起！没有符合条件的记录！</div>
                            @endif
                            <ul class="one last">
                                <li class="p1" style="width:80px;">
                                    <input name="selectall" id="selectall" class="checkboxs" value="234" type="checkbox" onclick="CheckAll(this)"/>
                                    <label for="selectall">全选</label>
                                </li>
                                <li class="p2"><span class="pborder" onclick="showconfirm('{{url('company/department/0')}}','1')">删除记录</span></li>
                            </ul>
                        </div>
                    </form>
                </div>
                {{--分页--}}
                <div class="page_list">
                    {!! $list->appends($input)->links() !!}
                </div>
            </div>
        </div>
    </div>
@endsection
@section('footerjs')
    @parent
    <script type="text/javascript" src="{{asset('/default/js/company/department_list.js')}}"></script>
    <script type="text/javascript">
	$("#leftnav_data").addClass("active");
	</script>
@endsection
